package forks.model;

import java.util.Date;

public class User {
    long   id;
    String name;
    int    age;
    Date   birthday;

    public User() {

    }

    public User(long id, String name, int age, Date birthday) {
        super();
        this.id = id;
        this.name = name;
        this.age = age;
        this.birthday = birthday;
    }

    public long getId() {
        return id;
    }

    public void setId(long id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }

    public Date getBirthday() {
        return birthday;
    }

    public void setBirthday(Date birthday) {
        this.birthday = birthday;
    }

    public boolean equals(User another) {
        return id == another.getId();
    }

    @Override
    public String toString() {
        return String.format("id:%d name:%s age:%d birthday:%s", id, name, age, birthday);
    }
}
